package com.hooya.fa.eu.biz.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hooya.fa.eu.api.bo.LastCostBO;
import com.hooya.fa.eu.api.bo.SellPriceBO;
import com.hooya.fa.eu.api.bo.stk.BuyRecordBO;
import com.hooya.fa.eu.api.bo.stk.ReturnedRecordBO;
import com.hooya.fa.eu.api.bo.stk.SellRecordBO;
import com.hooya.fa.eu.biz.dao.mapper.*;
import com.hooya.fa.eu.biz.dao.mapper.rxh.CostMapper;
import com.hooya.fa.eu.biz.service.EuSourceDataService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Set;

/**
 * @Description 1
 * @Author : Zongz
 * @Copyright Copyright (c) 豪雅集团
 * @Create 2023/11/28
 * @Version 1.0.0
 */
@Slf4j
@Service
@DS("europe")
@AllArgsConstructor
public class EuSourceDataServiceImpl implements EuSourceDataService {

    private final CostMapper costMapper;

    private final B2CPriceMapper b2CPriceMapper;

    private final EuFbaMapper euFbaMapper;

    private final StkBuyMapper stkBuyMapper;

    private final StkSellMapper stkSellMapper;

    private final ReturnedMapper returnedMapper;

    @Override
    public List<LastCostBO> getMmList() {
        return costMapper.getMmBoList();
    }

    @Override
    public List<SellPriceBO> getPlnPrice() {
        return b2CPriceMapper.getPlnPrice();
    }

    @Override
    public List<SellPriceBO> getEurPrice() {
        return b2CPriceMapper.getEurPrice();
    }

    @Override
    public List<LastCostBO> getZyList() {
        return costMapper.getZyBoList();
    }

    @Override
    public List<String> getFbaCountryList() {
        return euFbaMapper.getFbaCountryList();
    }

    @Override
    public List<BuyRecordBO> getWarehousingListByDate(String startDate, String endDate) {
        return stkBuyMapper.getWarehousingListByDate(startDate, endDate);
    }

    @Override
    public List<BuyRecordBO> getZyListByDate(String startDate, String endDate) {
        return stkBuyMapper.getZyListByDate(startDate, endDate);
    }

    @Override
    public List<BuyRecordBO> getOtherZyListByDate(String startDate, String endDate) {
        return stkBuyMapper.getOtherZyListByDate(startDate, endDate);
    }

    @Override
    public List<String> getWhIdByTimeGet(String startDate, String endDate) {
        return stkSellMapper.getWhIdByTimeGet(startDate, endDate);
    }

    @Override
    public List<SellRecordBO> getDeliveryGoodsListByDate(String startDate, String endDate, List<String> whIds) {
        return stkSellMapper.getDeliveryGoodsListByDate(startDate, endDate, whIds);
    }

    @Override
    public List<SellRecordBO> getSellRecordListByDate(String startDate, String endDate) {
        return stkSellMapper.getSellRecordListByDate(startDate, endDate);
    }

    @Override
    public List<ReturnedRecordBO> getReturnedListByDate(String startDate, String endDate, List<String> returnedOrderIds) {
        return returnedMapper.getReturnedListByDate(startDate, endDate, returnedOrderIds);
    }

    @Override
    public List<BuyRecordBO> getZyListByDateAndSheetNumber(String startDate, String endDate, List<String> sheetNumberList) {
        return stkBuyMapper.getZyListByDateAndSheetNumber(startDate, endDate, sheetNumberList);
    }

    @Override
    public List<SellRecordBO> getSellListByDateAndSheetNumber(String startDate, String endDate, List<String> sheetNumberList) {
        return stkSellMapper.getSellListByDateAndSheetNumber(startDate, endDate, sheetNumberList);
    }

    @Override
    public List<SellRecordBO> getDeliveryGoodsListByDateAndSheetNumber(String startDate, String endDate, List<String> whIds,
                                                                       List<String> sheetNumberList) {
        return stkSellMapper.getDeliveryGoodsListByDateAndSheetNumber(startDate, endDate, whIds, sheetNumberList);
    }

    @Override
    public List<BuyRecordBO> getSupplementZyList(String startDate, String endDate) {
        return stkBuyMapper.getSupplementZyList(startDate, endDate);
    }

    @Override
    public List<SellRecordBO> getHisSellRecordListByDate(String suppStartDate, String suppEndDate) {
        return stkSellMapper.getHisSellRecordListByDate(suppStartDate, suppEndDate);
    }

    @Override
    public List<SellRecordBO> getHisDeliveryGoodsListByDate(String suppStartDate, String suppEndDate, List<String> whIds) {
        return stkSellMapper.getHisDeliveryGoodsListByDate(suppStartDate, suppEndDate, whIds);
    }

    @Override
    public List<SellPriceBO> getOtherPrice(Set<String> orderIdList) {
        return b2CPriceMapper.getOtherPrice(orderIdList);
    }

	@Override
	public List<SellRecordBO> getlywlIsFbaReturnList(String startDate, String endDate) {
		return stkSellMapper.getlywlIsFbaReturnList(startDate, endDate);
	}
}
